# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Massimiliano Torromeo < massimiliano DOT torromeo AT gmail DOT com >

pkgname=python-asn1crypto
pkgver=1.5.1
pkgrel=2
arch=('any')
license=('MIT')
pkgdesc="Python ASN.1 library with a focus on performance and a pythonic API"
url="https://github.com/wbond/asn1crypto"
depends=('python')
makedepends=('python-setuptools')
source=("$pkgname-$pkgver.tar.gz::https://github.com/wbond/asn1crypto/archive/$pkgver.tar.gz")
sha512sums=('1bcb93d82a2602e3b5c66a180f5d16cd3a9731d86d89fbd44c1e23d735e708e9bf9bb6cbabc2a5d60619f51a7c38dfb1f7ed63820f422ccf42800a39f4637626')

build() {
  cd "$srcdir"/asn1crypto-$pkgver
  python setup.py build
}

check() {
  cd "$srcdir"/asn1crypto-$pkgver
  python run.py tests
}

package() {
  cd asn1crypto-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/python-asn1crypto/LICENSE
}
